import request from "@/utils/request";

/**
 * 
 * @param {登录接口接收的用户信息} loginInfo 
 * @data {name:String,password:String}
 * @returns 
 */
export function getLoginInfo(loginInfo) {
    return request({
        method: "POST",
        url: '/frontend/sso/login',
        data: loginInfo
    })
}
/**
 * @description 查询个人信息
 * @returns 获取我的用户信息 并且将数据返回
 */
export function getMyUserInfo() {
    return request({
        method: "POST",
        url: '/frontend/my/info/',
    })
}

/**
 * 
 * @description 注册接口
 */
export function register(data) {
    return request({
        method: "POST",
        url: '/frontend/sso/register',
        data
    })
}
/**
 * 
 * @description 退出登录
 */
export function logout(token) {
    return request({
        method: "POST",
        url: '/frontend/sso/logout',
        token
    })
}

/**
 * 
 * @description 重置密码
 */
export function updatePassword(data) {
    return request({
        method: "POST",
        url: '/frontend/sso/password/update',
        data
    })
}
